﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace SAR
{
    public partial class AnalyzePageControl
	{
         public AnalyzePageControl()
		{
			this.InitializeComponent();


             //初始化
            pageCtrLists[0] = "CanShuFenXi0.xaml";
            pageCtrLists[1] = "CanShuFenXi1.xaml";
            pageCtrLists[2] = "CanShuFenXi2.xaml";
            pageCtrLists[3] = "CanShuFenXi3.xaml";
            pageCtrLists[4] = "CanShuFenXi4.xaml";
            pageCtrLists[5] = "CanShuFenXi5.xaml";
            pageCtrLists[6] = "CanShuFenXi6.xaml";
            pageCtrLists[7] = "CanShuFenXi7.xaml";
            pageCtrLists[8] = "CanShuFenXi8.xaml";
            pageCtrLists[9] = "CanShuFenXi9.xaml";
            pageCtrLists[10] = "CanShuFenXi10.xaml";


            radioNumLists[0] = 3;
            radioNumLists[1] = 2;
            radioNumLists[2] = 3;
            radioNumLists[3] = 2;
            radioNumLists[4] = 1;

           
			// 在此点之下插入创建对象所需的代码。
		}


         //属性，页面路径数组，必须初始化！
         public string[] pageCtrLists = new string[100];

         //每个大选项对应的单选框个数列表
         private int[] radioNumLists = new int[100];
 

         private int currentStp = 0;

         private void AnalyzeNavBar_SARStepIndexChanged(int stepIndex)
         {
             currentStp = 0;
             if (stepIndex == 4)
             {
                 this.DoPage.Width = this.DoPage.Width + 40;
                 this.DoPage.Margin = new Thickness(0, -36, 0, 7);

             }
             for (int i = 0; i < stepIndex;i++ )
             {
                 currentStp += radioNumLists[i];
             }
             this.DoPage.Source = new System.Uri(pageCtrLists[currentStp], UriKind.Relative);
         }

         private void AnalyzeNavBar_SARRadioIndexChanged(int stepIndex, int radioIndex)
         {
             currentStp = 0;
             for (int i = 0; i < stepIndex;i++ )
             {
                 currentStp += radioNumLists[i];
             }
             currentStp += radioIndex;
             
             this.DoPage.Source = new System.Uri(pageCtrLists[currentStp], UriKind.Relative);
         }

    }
}